#include <Timer.h>
#include "pingpong.h"

//
 configuration pingpongAppC {
 }
 implementation {
   components MainC;
   components LedsC;
   components pingpongC as App;
//serie transmit
   components SerialActiveMessageC as AMSerial;
//the timers
   components new TimerMilliC() as Timer0;
   components new TimerMilliC() as AlarmC;
//Radio tranceiver
   components ActiveMessageC;
   components new AMSenderC(AM_PINGPONGMSG) as AMSenderRadioC;
   components new AMReceiverC(AM_PINGPONGMSG) as AMReceiverRadioC;

   App.Boot -> MainC;
   App.Leds -> LedsC;
   App.Timer0 -> Timer0;
   App.Alarm -> AlarmC;
//Radio tranceiver
   App.PacketRadio -> AMSenderRadioC;
   App.AMPacketRadio -> AMSenderRadioC;
   App.AMSendRadio -> AMSenderRadioC;
   App.AMControlRadio -> ActiveMessageC;
   App.ReceiveRadio -> AMReceiverRadioC;
//serie transmit
   App.ControlSerial -> AMSerial;
   App.ReceiveSerial -> AMSerial.Receive[AM_PINGPONGMSG];
   App.AMSendSerial -> AMSerial.AMSend[AM_PINGPONGMSG];
   App.PacketSerial -> AMSerial;
   

 }
